import time

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

# path = Service('/Users/1117i/Downloads/chromedriver-mac-x64/chromedriver')
path = Service('./chromedriver')
# 打开浏览器，返回浏览器对象
# driver = webdriver.Chrome(executable_path='/Users/1117i/Downloads/chromedriver-mac-x64/chromedriver')
driver = webdriver.Chrome(service=path)
# driver = webdriver.Chrome()

# 打开百度首页
driver.get('https://www.baidu.com/')

# 浏览器最大化
driver.maximize_window()

# 等待3s
time.sleep(3)

# 关闭浏览器
driver.quit()
